<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <div id="app">
        预先定义了keycode 116（即F5）的别名为f5，因此在文字输入框中按下F5，会触发prompt方法
        <input type="text" v-on:keydown.A="prompt">
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
    
    <script>
        
        Vue.config.keyCodes.f5 = 111;
        Vue.config.keyCodes.A = 65;
    
        let app = new Vue({
            el: '#app',
            methods: {
                prompt: function() {
                    alert('我是 F5！');
                    console.log(1111)
                }
            }
        });
    </script> -->

    <script>
        var fn = function(){
            console.log(1)
            // return 2
        }

        fn()
        // console.log(fn());
    </script>
</body>
</html>